﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="meusFavoritos.aspx.cs" Inherits="UI.meusFavoritos"  MasterPageFile="~/wiki.Master"%>

<asp:Content ID="meusFavoritos" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
    
        <asp:ScriptManager ID="ScriptManager" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="upFavoritos" runat="server">
            <ContentTemplate>
               
        <br />
                <asp:Panel ID="pnSucesso" runat="server" BackColor="#CCFFCC" 
        style="text-align: center" Visible="False">
        <img alt="" src="Images/Ok-16x16.png" style="width: 16px; height: 16px" />
        <asp:Label ID="lbMsgSucesso" runat="server" 
            style="font-weight: 700; color: #006600; font-size: small"></asp:Label>
    </asp:Panel>
    <asp:Panel ID="pnFalha" runat="server" BackColor="#FFCCCC" 
                    style="text-align: center" Visible="False">
                    &nbsp;<img alt="" src="Images/Error-16x16.png" style="width: 16px; height: 16px" />
                    <asp:Label ID="lbMsgFalha" runat="server" 
                        style="font-weight: 700; color: #FF0000; font-size: small;"></asp:Label>
                </asp:Panel>
        <h2>Meus Favoritos:</h2>
        <asp:GridView ID="gvFavoritos" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" ForeColor="#333333" GridLines="None" 
            onrowdeleting="gvFavoritos_RowDeleting" DataKeyNames="idPostNew">
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#999999" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
            <asp:TemplateField HeaderText="ID" Visible="False">
                <ItemTemplate>
                     <%# Eval("idPostNew") %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Titulo">
                <ItemTemplate>
                    <a href='visualizarPostNew.aspx?idPostNew=<%# Eval("idPostNew") %>'><%# Eval("titulo") %></a>
                    <%--<%# Eval("titulo") %>--%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Qtd. Lidas">
                <ItemTemplate>
                    <%# Eval("qtdLidas") %>
                </ItemTemplate>
            </asp:TemplateField>           
            <asp:CommandField ShowDeleteButton="True"/>
            
        </Columns>
        </asp:GridView>
        <br />
        </ContentTemplate>
        </asp:UpdatePanel>
        
</asp:Content>